package com.lovo.roomProject.room.service.impl;

import com.lovo.roomProject.pojo.CutPageBean;
import com.lovo.roomProject.pojo.RoomDO;
import com.lovo.roomProject.room.dao.RoomDAO;
import com.lovo.roomProject.room.dao.impl.RoomDAOImpl;
import com.lovo.roomProject.room.service.RoomService;

import java.util.List;

public class RoomServiceImpl implements RoomService {
   private   RoomDAO roomDAO = new RoomDAOImpl();

    @Override
    public List listRoom() {
        return roomDAO.listRoom();

    }


    @Override
    public List listRoomByType(String type) {
        return roomDAO.listRoomByType(type);
    }

    @Override
    public CutPageBean listRoomByPage(int current,String addr,String status,String available,String type) {
        return roomDAO.listRoomByPage(current,addr,status,available,type);
    }

    @Override
    public void insert(RoomDO roomDO) {
        roomDAO.insert(roomDO);
    }

    @Override
    public RoomDO getAddr(String addr) {
        return roomDAO.getAddr(addr);
    }

    @Override
    public int getCount(int id) {
        return roomDAO.getCount(id);
    }

    @Override
    public void delete(int id) {
        roomDAO.delete(id);
    }

    @Override
    public RoomDO getById(int id) {
        return roomDAO.getById(id);
    }

    @Override
    public List listStudentById(int id) {
        return roomDAO.listStudentById(id);
    }

    @Override
    public void update(RoomDO roomDO) {
        roomDAO.update(roomDO);
    }

}
